/*
 * @Author: hupaocai 13767071930@163.com
 * @Date: 2025-03-27 17:34:49
 * @LastEditors: hupaocai 13767071930@163.com
 * @LastEditTime: 2025-03-29 11:37:20
 * @FilePath: /banban-front/api/login.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 下发短信验证码
export function getCodeVerify(data) {
    return request({
        url: '/ban/user/getCodeVerify',
        headers: {
            isToken: false,
        },
        method: 'post',
        data,
        loading: false
    })
}


// 短信验证码登录
export function verifyCodeLogin(data) {
    return request({
        url: '/ban/user/verifyCodeLogin',
        headers: {
            isToken: false,
        },
        method: 'post',
        data,
        loading: false
    })
}

// 注册账号
export function register(data) {
    return request({
        url: '/ban/user/register',
        headers: {
            isToken: false,
        },
        method: 'post',
        data,
        loading: false
    })
}

// 个人信息查询
export function getUserInfo(data) {
    return request({
        url: '/ban/user/getUserInfo',
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}

// 编辑个人信息
export function updateUserInfo(data) {
    return request({
        url: '/ban/user/updateUserInfo',
        headers: {
            isToken: false,
        },
        method: 'post',
        data,
        loading: false
    })
}

// 绑定NFC
export function bindNfc(data) {
    return request({
        url: '/ban/user/bindNfc/' + data.nfcId,
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}

// 解绑NFC
export function notBindNfc(data) {
    return request({
        url: '/ban/user/notBindNfc',
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}

// 绑定手机
export function bindPhone(data) {
    return request({
        url: '/ban/user/bindPhone',
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}

// 解绑手机
export function unBindPhone(data) {
    return request({
        url: '/ban/user/unbindPhone',
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}


// 退出登录
export function logout(data) {
    return request({
        url: '/ban/user/logout',
        headers: {
            isToken: false,
        },
        method: 'get',
        data,
        loading: false
    })
}